Repository navigation
Phase 1a: Scaffold Cargo workspace and rust-toolchain - #26
Merged
Merged
Conversation
Add a minimal Cargo workspace (crates/fastled-cli, crates/fastled-py) with rust-toolchain.toml pinned to 1.94.1, ci/env.py for MSVC environment setup, trampoline scripts (_cargo, _rustc, _rustfmt), and update install/lint/test scripts to bootstrap and exercise the Rust toolchain alongside the existing Python steps.
- Restore original bash install script format (CI was broken by uv run --script rewrite) - Add Rust toolchain bootstrap to install script (rustup + pinned channel) - Fix _cargo trampoline to prepend toolchain bin to PATH and set CARGO_BUILD_TARGET to MSVC on Windows (prevents Chocolatey GNU contamination) - Use uv run instead of venv activation in lint/test scripts - Remove cygpath dependency from scripts (not available on Linux/macOS)
…rash The venv-bundled pip crashes on Ubuntu 24.04 CI runners when calling uname -rs during user-agent detection. Using uv pip directly avoids invoking the buggy pip entirely.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fastled-cli(binary) andfastled-py(PyO3 cdylib)rust-toolchain.tomlwith clippy and rustfmt componentsci/env.pywith MSVC environment helpers (host_target_triple,_find_vsdevcmd,_windows_build_env,activate,_apply_sccache)_cargo,_rustc,_rustfmtthat prefer~/.cargo/bininstallscript to bootstrap rustup and install the pinned toolchain (adapted from running-process pattern)lintscript to runcargo fmt --all --checkandcargo clippy --workspace --all-targets -- -D warningsbefore Python lintingtestscript to runcargo test --workspacebefore Python tests/target/,/.cargo/,/.rustup/to.gitignoreNo existing Python source files in
src/fastled/were modified.Test plan
cargo build --workspacesucceeds with 0 errorscargo test --workspacepasses (0 tests, 0 failures)cargo clippy --workspace --all-targets -- -D warningspasses cleancargo fmt --all --checkpasses with no formatting issuespytest tests/unit)pyright src compiler testsreports 0 errorsci/env.pypasses ruff, black, isort, pyright checksCloses #15